package com.AIDS.AIDSweeper.server.model;

import java.util.Date;

import com.google.appengine.api.datastore.Key;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import com.google.appengine.api.datastore.GeoPt;

@PersistenceCapable
public class Mine {

	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key id;
	
	@Persistent
	private GeoPt position;
	
	@Persistent
	private boolean found;
	
	@Persistent
	private Player mineSetter;
	
	@Persistent
	private Date setTime;
	
	@Persistent
	private Player mineSweeper;
	
	@Persistent
	private Date sweepTime;
	
	@Persistent
	private Game inGame;

	public Mine(Key id, GeoPt position, boolean found, Player mineSetter,
			Date setTime, Player mineSweeper, Date sweepTime, Game inGame) {
		super();
		this.position = position;
		this.found = found;
		this.mineSetter = mineSetter;
		this.setTime = setTime;
		this.mineSweeper = mineSweeper;
		this.sweepTime = sweepTime;
		this.inGame = inGame;
	}

	public Key getId() {
		return id;
	}

	public void setId(Key id) {
		this.id = id;
	}

	public GeoPt getPosition() {
		return position;
	}

	public void setPosition(GeoPt position) {
		this.position = position;
	}

	public Player getMineSetter() {
		return mineSetter;
	}

	public void setMineSetter(Player mineSetter) {
		this.mineSetter = mineSetter;
	}

	public Date getSetTime() {
		return setTime;
	}

	public void setSetTime(Date setTime) {
		this.setTime = setTime;
	}

	public Player getMineSweeper() {
		return mineSweeper;
	}

	public void setMineSweeper(Player mineSweeper) {
		this.mineSweeper = mineSweeper;
	}

	public Date getSweepTime() {
		return sweepTime;
	}

	public void setSweepTime(Date sweepTime) {
		this.sweepTime = sweepTime;
	}

	public boolean isFound() {
		return found;
	}

	public void setFound(boolean found) {
		this.found = found;
	}

	public Game getInGame() {
		return inGame;
	}

	public void setInGame(Game inGame) {
		this.inGame = inGame;
	}
}
